﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Store.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<YourStore.Models.OrderDetail>>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Administration
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>Store Statistics</h2>
<h3>Order totals</h3>
  <table id="storemanager" class="admin">
        <tr>
            <th width="100">Order Status</th>
            <th width="100">Today</th>
           <th width="100">This Week</th>
           <th width="100">This Month</th>
           <th width="100">This Year</th>
           <th width="100">All Time </th>
        </tr>
        <tr>
        <td><%=ViewData["OrderStatus"] %></td>
        <td><%=ViewData["Today"] %></td>
        <td><%=ViewData["ThisWeek"]%></td>
        <td><%=ViewData["ThisMonth"]%></td>
        <td><%=ViewData["ThisYear"]%></td>
        <td><%=ViewData["AllTime"]%></td>
        </tr>
        </table>		
        <h3>Best Sellers </h3> 
          <table id="tblbest" class="admin">
        <tr>
        <th width="400">Product	</th>
        <th width="60">Total count</th>
        <th width="100">Total amount</th>
           
        </tr>
         <% foreach (var product in Model)
           { %>
      <tr>
      <td><%: product.Product.Name %></td>
      <td><%: product.Quantity %></td>
      <td> $ <%:(product.UnitPrice) * (product.Quantity)%></td>
      </tr> 
        <% } %>




        </table>
   
</asp:Content>

